package com.itheima.pattern.interpreter;

import java.util.HashMap;
import java.util.Map;

/**
 * @Description com.itheima.pattern.interpreter
 * @Author Mokairui
 * @Since 2022/1/2
 */
public class Context {

    private Map<Variable, Integer> map = new HashMap<>();

    public void assign(Variable var, Integer value) {
        map.put(var, value);
    }

    public int getValue(Variable variable) {
        return map.get(variable);
    }

}
